<script lang="ts">
import { provideState } from "@/scripts/usestateHello";
import { defineComponent, ref } from "vue";
import HelloWorld from "@/components/HelloWorld.vue";
export default defineComponent({
  name: "mine",
  components: {
    HelloWorld,
  },
  setup() {
    const { location } = provideState();
    const msg = ref("Hello Vue 3 + TypeScript + Vite");
    const updateMsg = (res: string) => {
      msg.value = res;
    };
    return { msg, updateMsg, location };
  },
});
</script>
<template>
  <div>
    <h1>{{ location.user }}--{{ location.region }}</h1>
    <HelloWorld :msg="msg" @update:msg="updateMsg"></HelloWorld>
  </div>
</template>
<style lang="scss" scoped></style>
